{% set recommendCourses = data('RecommendCourses',{type:'live',count:5}) %}
<div class="panel panel-default es-live-recommend">
  <div class="panel-heading">
    <a href="{{ path('course_explore', {filter: {type: 'live',price: '',currentLevelId: 'all'},orderBy: 'recommendedSeq'}) }} " class="more">
      <i class="es-icon es-icon-morehoriz"></i>
    </a> 
    <h3 class="panel-title">推荐课程</h3>
  </div>
  
  <div class="panel-body">
  	{% for course in recommendCourses if course %}
	    <div class="media">
	      <div class="media-left">
	      	<a href="{{ path('course_show',{id:course.id}) }}" title="{{ course.title }}" target="_blank">
            <img src="{{ filepath(course.smallPicture, 'course.png') }}" class="img-responsive">
          </a>
	        
	      </div>
	      <div class="media-body">
	        <div class="title">
	          <a href="{{ path('course_show',{id:course.id}) }}" class="gray-darker" title="{{ course.title }}" target="_blank">{{ course.title|plain_text(20) }}</a>
	        </div>
	        <div class="metas">
	        	{% include 'TopxiaWebBundle:Course:Widget/course-price.html.twig' with {shows:'price'} %}
	        </div>
	      </div>
	    </div>
    {% else %}
    	<div class="empty">暂无推荐课程</div>
    {% endfor %}

  </div>
  
</div>